from fdfs_client.client import Fdfs_client# 创建fastDFS客户端对象fast_client = Fdfs_client('client.conf')# 上传图片ret = fast_client.upload_by_filename('/Users/chao/Desktop/01.jpeg')f = open('/Users/chao/Desktop/01.jpeg', 'rb')content = f.read()ret = fast_client.upload_by_buffer(content)print(ret)"""{'Group name': 'group1', 'Remote file_id': 'group1/M00/00/00/wKhn0l2r0RmADngWAAC4j90Tziw29.jpeg', 'Status': 'Upload successed.', 'Local file name': '/Users/chao/Desktop/01.jpeg', 'Uploaded size': '46.00KB', 'Storage IP': '192.168.103.210'}"""